import java.awt.Color;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JPanel;

public class ControlPanel2 extends JPanel {

  /**
   * Create the panel
   */
  public ControlPanel2() {
    super();
    setLayout(null);
    setPreferredSize(new Dimension(300, 60));
    setBackground(RABID.BACK_COLOR);

    displayButton = new JButton();
    displayButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        RABID.getMainFrame().doDisplay();
      }
    });
    displayButton.setMargin(new Insets(2, 10, 2, 10));
    displayButton.setBackground(Color.LIGHT_GRAY);
    displayButton.setBounds(38, 20, 93, 23);
    displayButton.setText("DISPLAY");
    displayButton.setEnabled(false);
    add(displayButton);

    similarToButton = new JButton();
    similarToButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        RABID.getMainFrame().doSimilarTo();
      }
    });
    similarToButton.setMargin(new Insets(2, 5, 2, 5));
    similarToButton.setBackground(Color.LIGHT_GRAY);
    similarToButton.setBounds(169, 20, 93, 23);
    similarToButton.setText("SIMILAR TO");
    similarToButton.setEnabled(false);
    add(similarToButton);
  }

  public void enableDisplay(boolean enableDisplay) {
    displayButton.setEnabled(enableDisplay);
  }

  public void enableSimilar(boolean enableSimilar) {
    similarToButton.setEnabled(enableSimilar);
  }

  private JButton displayButton;
  private JButton similarToButton;

}
